#include "stage.h"
#include "RobotBase.h"

#ifndef __ROBOT1_H__
#define __ROBOT1_H__

using namespace Stg;
using namespace std;

class RobotHMHModify:public RobotBase
{
    private:
        //  the current time
        int CurrentTime;
        // the time frame
        const static int MaxTime = 400;
        // length of Refractory phase
        const static int RefracPhase = 20;
        //  the end of Stimulated-Only phase
        int StimulateOnlyPhase;
        int SizeRecord; // number to record stimulated robots
        // the probability of emit a signal in Stimulated + Non-stimulated signaling phase. 60 means 60%% to emit a signal
        const static int EmitProbability = 40;
        // the decrease of C2
        const static int Dec = 10;
    public:
        RobotHMHModify(Model* model);
        //Constructor
        ~RobotHMHModify();

        virtual void Estimate();
        virtual void MessageReceive(WifiMessageBase* mesg);
        void BroadCast();
    private:
        bool IsBroadCast();
};// end Robot

#endif
